import { useState } from "react";

export function useWindowScroll(){
    let [y,setY]=useState()
    window.addEventListener('scroll',()=>{
        let h=document.documentElement.scrollTop
        setY(h)
    })
    return [y]
}